Skip to content

[Payment due @nkdengineer] Set user-level office arrangements - #104344

Merged
mjasikowski merged 28 commits into
mainfrom
alberto-commuteR4Users
Oct 22, 2026
Merged

mjasikowski merged 28 commits into
mainfrom
alberto-commuteR4Users

Conversation

@Gonals

@Gonals Gonals commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/642622
$ https://github.com/Expensify/Expensify/issues/693979
$ https://github.com/Expensify/Expensify/issues/694433
PROPOSAL:

Tests

In an account with the commuterExclusionsArrangements on (let's say expensifail):

  1. Create (if needed) a WS with you and another 2-3 users
  2. Go to Workspace -> Overview and add a company address.
  3. Below, add an office. Keep the company address as default:
Screenshot 2026-10-19 at 13 07 26
  1. Go to Workspace > Members and open member A.
  2. Verify there is an "Office location" row showing the default:
Screenshot 2026-10-19 at 13 08 08
  1. Tap the row and select the other office. Confirm it swaps correctly:
    Screenshot 2026-10-19 at 13 12 08\

  2. Confirm the update is posted to the admins chat:

Screenshot 2026-10-19 at 13 10 55
  1. Go back to the members section and select members B and C, then open the "2 selected" dropdown. Verify "Change office location" is listed, and select it.
    9 . Change their offices. Confirm it works and the messages are posted to the admins chat

  2. Go to Workspace > Distance rates > Settings > Exclude commutes, select "Exclude usual commute" and save. Choose Office-based.

  3. Back in Members, select B and C and open the dropdown. Verify "Change work arrangement" is listed, and select it.

  4. Select "Remote or mobile" and press "Confirm".

  5. Verify B's and C's member details show the new "Work arrangement", and #admins logs the change for each.

  6. In Workspace > Overview > Office locations, delete the new office
    15 Confirm the people in that office are now back to the primary

  • Verify that no errors appear in the JS console

Offline tests

None

QA Steps

Same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@Gonals Gonals self-assigned this Oct 19, 2026
@OSBotify

This comment has been minimized.

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 95.90% <ø> (ø)
src/CONST/runtimeConfigured.ts 100.00% <ø> (ø)
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/SCREENS.ts 100.00% <ø> (ø)
...WorkspaceMembersTable/WorkspaceMembersTableRow.tsx 92.85% <100.00%> (+0.54%) ⬆️
src/libs/API/types.ts 100.00% <ø> (ø)
src/libs/ExportOnyxState/masking.ts 80.95% <ø> (ø)
...gation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts 100.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 62.50% <ø> (ø)
src/libs/OfficeLocationUtils.ts 100.00% <100.00%> (ø)
... and 22 more
... and 8 files with indirect coverage changes

@Gonals
Gonals marked this pull request as ready for review October 19, 2026 13:38
@Gonals
Gonals requested review from a team as code owners October 19, 2026 13:38
@melvin-bot
melvin-bot Bot requested review from nkdengineer and removed request for a team October 19, 2026 13:38
@melvin-bot

melvin-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

@nkdengineer Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot requested review from trjExpensify and removed request for a team October 19, 2026 13:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T13:45:05.949978Z b393cf0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread src/libs/OfficeLocationUtils.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b393cf0dfc

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/libs/actions/Policy/Member.ts Resolved
@trjExpensify
trjExpensify requested review from JmillsExpensify and removed request for trjExpensify October 19, 2026 14:07
@trjExpensify

Copy link
Copy Markdown
Contributor

@JmillsExpensify's project, re-assigned product review.

@melvin-bot

melvin-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

@mjasikowski Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot Bot changed the title Set user-level office arrangements [Payment due @nkdengineer] Set user-level office arrangements Oct 21, 2026
@melvin-bot

melvin-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

🎯 @nkdengineer, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/642622.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

@nkdengineer

nkdengineer commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

@Gonals We can do this in a follow-up: the update location change log is not translated in LHN, copy to clipboard and thread header view. The same for remove office location and update work arrangement change log

Screen.Recording.2026-10-21.at.23.54.43.mov

@JmillsExpensify

Copy link
Copy Markdown
Contributor

Bug: The Confirm button is missing on the member work arrangement page.
Screen.Recording.2026-10-21.at.22.40.34.mov

Not part of this PR and it matches the design, but I agree it is inconsistent

cc @JmillsExpensify

Yes, agreed. Good catch. Should I create a separate issue for it?

@Gonals

Gonals commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Bug: The Confirm button is missing on the member work arrangement page.
Screen.Recording.2026-10-21.at.22.40.34.mov

Not part of this PR and it matches the design, but I agree it is inconsistent
cc @JmillsExpensify

Yes, agreed. Good catch. Should I create a separate issue for it?

Yes, please. Send it my way :)

@mjasikowski
mjasikowski merged commit 32253ff into main Oct 22, 2026
52 of 54 checks passed
@mjasikowski
mjasikowski deleted the alberto-commuteR4Users branch October 22, 2026 11:29
@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

🚧 mjasikowski has triggered a test Expensify/App build. You can view the workflow run here.

Copy link
Copy Markdown
Contributor

Add set on the App issue: #104719. I added the same people.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.5.20-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed. Every user-facing change in this PR is behind the COMMUTER_EXCLUSIONS_ARRANGEMENTS beta. That includes the Office location row, the Change office location and Change work arrangement bulk actions, and the Office locations section on Workspace Overview, so most users can't see it yet.

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #104893 was identified to be related to this PR.

@jponikarchuk

Copy link
Copy Markdown

Deploy Blocker #104896 was identified to be related to this PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.5.20-5 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 failure ❌

Bundle Size Analysis (Sentry):

@melvin-bot

melvin-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #105061

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants